home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Classes / 2.0_PetriDish / PetriDish / PetriDish.h < prev    next >
Encoding:
Text File  |  1992-07-02  |  1.8 KB  |  61 lines

  1. // PetriDish.h
  2. // By Charles G. Fleming, Educational Computing Services, Allegheny College.
  3. // You may freely copy, distribute and reuse this code. 
  4. // Allegheny College and the author disclaim any warranty of any kind, 
  5. // expressed or implied, as to its fitness for any particular use.
  6. // This work was partially supported by a grant from the Vira Heinz Endowment.
  7.  
  8. #import <appkit/View.h>
  9. #import <appkit/color.h>
  10.  
  11. @interface PetriDish:View
  12. {
  13.     id clickCountTextField;
  14.     id petriDishNXImage;
  15.     id spotsNXImage;
  16.     id gridNXImage;
  17.     id spotNXImage;    
  18.     id inspector; 
  19.     id clickCursorNXImage;  
  20.     id clickCursor; 
  21.     BOOL gridState, okButtonPushed;
  22.     float gridSpacing, petriDishRadius;              // in centimeters
  23.     float spotRadius;                                              // in millimeters
  24.     float agarRadius, dotRadius, gridDelta;       // in pixels
  25.     float petriRed, petriGreen, petriBlue, spotRed, spotGreen, spotBlue; 
  26.     int numSpots;
  27.     NXColor agarColor, spotColor;
  28.     NXSize spotNXImageSize;    
  29.     int clicks;
  30. }    
  31.  
  32. - (const char *)inspectorName;
  33. - setFrame:(const NXRect *)frameRect;
  34. - (const char *)inspectorName;
  35. - initFrame:(NXRect *)frameRect;
  36. - turnGridOn:(BOOL)flag withSpacing:(float)spacing;
  37. - setAgarRadius:(float)radius;
  38. - setAgarColor:(NXColor)color;
  39. - setSpotColor:(NXColor)color;
  40. - setSpotRadius:(float)radius;
  41. - setNumSpots:(int)spots;
  42. - drawSelf:(NXRect *)rects :(int)count;
  43. - drawPetriDishWithSpots:(int)spots;
  44. - drawSpotsInNXImage:(int)spots;
  45. - (float)gridSpacing;
  46. - (BOOL)gridState;
  47. - (float)petriDishRadius;
  48. - (int)numSpots;
  49. - (float)spotRadius;
  50. - okPushed:(BOOL)flag;
  51. - setInspector:anObject;
  52. - (NXColor) agarColor;
  53. - (NXColor) spotColor;
  54. - mouseDown:(NXEvent *)theEvent;
  55. - resetClickCount:sender;
  56. - (int)clickCount;
  57. - resetCursorRects;
  58. - write:(NXTypedStream *)typedStream;
  59. - read:(NXTypedStream *)typedStream;
  60. - awake;
  61. @end